<template>
  <n-loading-bar-provider>
    <n-message-provider>
      <n-notification-provider>
        <n-dialog-provider>
          <n-config-provider :theme="theme" :locale="locale" :date-locale="dateLocale">
            <n-global-style />
            <router-view />
          </n-config-provider>
        </n-dialog-provider>
      </n-notification-provider>
    </n-message-provider>
  </n-loading-bar-provider>
</template>

<script>
import { ref } from "vue";
import { useOsTheme,darkTheme,zhCN, dateZhCN } from "naive-ui";
export default {
  name: 'App',
  data(){
    return {
    }
  },
  setup(){
    if (useOsTheme().value == "dark") {
      return { theme: darkTheme,locale:ref(zhCN),dateLocale:ref(dateZhCN) };
    } else {
      return {theme:null,locale:ref(zhCN),dateLocale:ref(dateZhCN)};
    }
  }
}
</script>
<style scoped>
.particles-js {
  width: 100%;
  height: 100%;
}
</style>